//
//  WxLogin.swift
//  imprint
//
//  Created by 小柠檬🍋 on 2025/1/11.
//

import Foundation
import SwiftUI
import LeanCloud
import CloudKit
import Contacts

class TouristLogin : BaseViewModel, LoginProtocol {
    
    let typeKey = LoginType.TOURIST.rawValue
    func doLogin() {
        getLogin(type: LoginType.TOURIST)?.doAuthSuc(code: "")
    }
    
    func bind() {
        //在代理那边处理
    }
    
    
    func doAuthSuc(code: String) {
        //在代理那边处理
        
    }
    
    func doAuthSuc(access_token: String, openid: String) {
        //无需处理
    }
    
    
    func getAuthInfo(code: String) async throws -> (String, String, UserBean) {
        let newUserBean = UserBean()
        newUserBean.name = "时光"
        newUserBean.sex = 1
        return (typeKey, getDeviceId(), newUserBean)
    }
    
    func getAuthInfo(access_token: String, openid: String) async throws -> (String, String, UserBean) {
        //无需处理
        return ("","", UserBean())
    }
    
    func doLoginAccount(type: String, id: String, newUserBean: UserBean) {
        //在代理那边处理
    }
    
    
    
}
